﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_CM_UpdateClient]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_CM_UpdateClient];
GO
CREATE PROCEDURE [dbo].[sproc_CM_UpdateClient]
@ID INT,
@birthday Datetime,
@chieflinkmanid int,
@UpdateTime datetime,
@AddmanID int,
@Shortname nvarchar(100),
@Name nvarchar(100),
@ContactTimes int,
@SellPhase nvarchar(100),
@BargainPrognosis nvarchar(100),
@Fee int,
@Linkman_Telephone nvarchar(100),
@CurStatus nvarchar(100),
@Type nvarchar(100),
@Affiliatedarea nvarchar(100),
@URL nvarchar(100),
@ZIP nvarchar(100),
@Address nvarchar(100),
@CompanyProperty nvarchar(100),
@Calling nvarchar(2000),
@CompanySize nvarchar(100),
@Money nvarchar(100),
@Operation nvarchar(100),
@Introduce nvarchar(1000),
@ITGrade nvarchar(1000),
@PCNumber int,
@Net nvarchar(100),
@ITStaffs int,
@ITDepartment nvarchar(100),
@System nvarchar(1000),
@Customer nvarchar(100),
@ClientInitiative nvarchar(100),
@FirstContactTime Datetime,
@NextContactTime datetime,
@Principal nvarchar(100),
@ContactTime datetime
AS
    UPDATE UDS_CM_ClientInfo 
    SET 
    Birthday=@birthday,
    chieflinkmanid=@chieflinkmanid,
    UpdateTime=@UpdateTime,
    AddmanID=@AddmanID,
    Shortname=@Shortname,
    Name=@Name,
    ContactTimes=@ContactTimes,
    SellPhase=@SellPhase,
    BargainPrognosis=@BargainPrognosis,
    Fee=@Fee,
    Linkman_Telephone=@Linkman_Telephone,
    CurStatus=@CurStatus,
    Type=@Type,
    Affiliatedarea=@Affiliatedarea,
    URL=@URL,
    ZIP=@ZIP,
    Address=@Address,
    CompanyProperty=@CompanyProperty,
    Calling=@Calling,
    CompanySize=@CompanySize,
    Money=@Money,
    Operation=@Operation,
    Introduce=@Introduce,
    ITGrade=@ITGrade,
    PCNumber=@PCNumber,
    Net=@Net,
    ITStaffs=@ITStaffs,
    Principal=@Principal,
    ITDepartment=@ITDepartment,
    System=@System,
    Customer=@Customer,
    ClientInitiative=@ClientInitiative,
    FirstContactTime=@FirstContactTime,
    NextContactTime=@NextContactTime,
    ContactTime=@ContactTime
    WHERE ID=@ID